﻿using System;

using Mojo;

namespace McDonalds
{
    [ImportClass(String.Empty, "StageAssistant")]
    public class StageAssistant : AbstractStageAssistant
    {
        public StageAssistant()
        {
        }

        public override void Setup()
        {
            AppSettings.Init();
            this.controller.PushScene("main");
        }

        public override void HandleCommand(Event events)
        {
            var currentScene = this.controller.ActiveScene();
            if (events.type == Mojo.Event.command)
            {
                switch (events.Command)
                {
                    case Mojo.Menu.helpCmd:
                        this.controller.PushAppSupportInfoScene();
                        break;
                }
            }
            else if (events.type == Mojo.Event.commandEnable)
            {
                switch (events.Command)
                {
                    case Mojo.Menu.helpCmd:
                        
                        if (!this.controller.ActiveScene().Assistant.helpMenuDisabled)
                        {
                            events.StopPropagation();
                        }
                        
                        break;
                }
            }
        }
    }
}
